﻿<ss:AppView x:Class="RTC.UI.ChatView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:ss="clr-namespace:SmartSpace.UI.Silverlight;assembly=SmartSpace.UI.Silverlight"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400">
    
    <Grid x:Name="LayoutRoot" Background="White">
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
            <RowDefinition Height="100"/>
            <RowDefinition Height="auto"/>
        </Grid.RowDefinitions>
        <Grid Grid.Row="0">
            <Grid.RowDefinitions>
                <RowDefinition Height="auto"/>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <TextBlock Text="聊天内容" Grid.Row="0" Margin="10,5,10,0"/>
            <ScrollViewer Name="_ctlScrollViewer" Grid.Row="1" Margin="5,0,5,5" Padding="0" VerticalScrollBarVisibility="Auto">
                <RichTextBox Name="_ctlEditMessage" IsReadOnly="True" VerticalScrollBarVisibility="Disabled" Foreground="Black" TextWrapping="Wrap" SizeChanged="_ctlEditMessage_SizeChanged">

                </RichTextBox>
            </ScrollViewer>
        </Grid>
        <Grid Grid.Row="1">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid Grid.Column="0">
                <Grid.RowDefinitions>
                    <RowDefinition Height="auto"/>
                    <RowDefinition Height="*"/>
                </Grid.RowDefinitions>
                <TextBlock Text="输入聊天内容" Grid.Row="0" Margin="10,5,10,0"/>
                <TextBox Name="_ctlEditInput" Margin="5,0,5,0" Grid.Row="1" Foreground="Black" TextWrapping="Wrap" />
            </Grid>
            <Grid Grid.Column="1">
                <Grid.RowDefinitions>
                    <RowDefinition Height="auto"/>
                    <RowDefinition Height="*"/>
                </Grid.RowDefinitions>
                <TextBlock Text="在线人员" Grid.Row="0" Margin="10,5,10,0"/>
                <ListBox Name="_ctlListUser" Margin="5,0,5,0" Grid.Row="1">
                    <ListBox.ItemTemplate>
                        <DataTemplate>
                            <TextBlock Text="{Binding Account}"/>
                        </DataTemplate>
                    </ListBox.ItemTemplate>
                </ListBox>
            </Grid>
        </Grid>
        <StackPanel Grid.Row="2" Orientation="Horizontal" Margin="5">
            <Button Content="Send" Name="_ctlBtnSend" Click="_ctlBtnSend_Click" Width="72" Height="32" Margin="10,0,10,5" />
            <TextBlock Name="_ctlLog" Text="log" VerticalAlignment="Center"/>
        </StackPanel>
    </Grid>
</ss:AppView>
